Skip to main content
Version: 4.x.x

AdapterType


import { AdapterType } from "@hyper-fetch/sockets"

Description

Defined in adapter/adapter.types.ts:8

Preview

type AdapterType = {
connect: () => void;
connecting: boolean;
disconnect: () => void;
emit: (eventMessageId: string, emitter: EmitterInstance, ack?: (error: Error | null, response: any) => void) => void;
listen: (listener: ListenerInstance, callback: ListenerCallbackType) => RemoveListenerCallbackType;
listeners: Map<string, Set<ListenerCallbackType>>;
reconnect: () => void;
removeListener: (name: string, callback: (...args: any) => void) => void;
}

Structure

{
connect: () => void;
connecting: boolean;
disconnect: () => void;
emit: (eventMessageId: string, emitter: EmitterInstance, ack?: (error: Error | null, response: any) => void) => void;
listen: (listener: ListenerInstance, callback: ListenerCallbackType) => RemoveListenerCallbackType;
listeners: Map<string, Set<ListenerCallbackType>>;
reconnect: () => void;
removeListener: (name: string, callback: (...args: any) => void) => void;
}